The Smart ComboBox Component > FComponentName (object)

 

FSmartComboBox (object)

The Smart ComboBox component creates a Combo Box that allows users to input data that is added to the Combo Box's drop-down menu. This component extends the Combo Box component provided with Macromedia Flash MX and it includes all of the methods and functionality available in that component. In addition, the Smart Combo Box component comes with a number of new features, including the ability to easily save user input in the Smart Combo Box between sessions.

This component provides an interface similar to the URL bar of many browsers—which allows users to enter data, save the data, and select from a menu of previously entered data. The developer has the option of making the data session-based, or to allow the data to persist across user's sessions.

Component methods do not perform error checking for type. This is different from other native ActionScript objects and actions, which do perform error checking. Therefore, it is recommended that you validate parameters before passing them to methods.

Method summary for the FSmartComboBox object.

Note: The methods below are in addition to the methods provided by the Combo Box component included with Macromedia Flash MX.

Method name

Description

FSmartComboBox.addItem(label,data,persist)

Adds an item to be displayed in the history.

FSmartComboBox.addItemAt(pos,label,data,persist)

Adds an item to be displayed in the history at the given index.

FSmartComboBox.allowDuplicates(bool)

Defines whether duplicate entries can be added to the history.

FSmartComboBox.autoAdd(bool)

Defines whether items will be automatically added to the history when the user presses enter.

FSmartComboBox.clearHistory()

Clears the history.

FSmartComboBox.getHistoryLength()

Gets the maximum items allowed that can be stored and added in the history.

FSmartComboBox.getPersistent()

Returns whether the ComboBox is persistent or not.

FSmartComboBox.getSharedObject()

Gets the SharedObject that is being used to persist the history.

FSmartComboBox.setHistoryLength(len)

Sets the maximum allowed items that can be stored and added in history.

FSmartComboBox.setPersistent(bool)

Sets whether the ComboBox is persistent or not.

FSmartComboBox.setSharedObject(SO)

Sets the SharedObject that the ComboBox will use to store the history.